package com.zq.designpaterns.other.compositeentity;

/**
 * ================================================
 * 作    者：程志强
 * 邮    箱：cheng.zhiqiang@cesgroup.com.cn
 * 版    本：1.0.0
 * 创建日期：2021/01/27  16:01
 * 修改日期：
 * 描    述：
 * 修订历史：
 * ================================================
 */
public class CoarseGrainedObject {
    private final DependentObject1 object1 = new DependentObject1();
    private final DependentObject2 object2 = new DependentObject2();

    public void setData(String data1, String data2) {
        object1.setData(data1);
        object2.setData(data2);
    }

    public String[] getData() {
        return new String[]{object1.getData(), object1.getData()};
    }
}
